package com.javarcore;

public class Sum1 {

    /** Creates a new instance of Sum1 */
	
	public Sum1()	{
		
	}
	
	public static void main(String[] args)	{
		int i =0, sum = 0,evenCount = 0;
		
		// Iterate until the sum of first 10 even numbers is computed
		
		while (evenCount<=10)	{
			
            // Check if the value contained by variable i is an even value
			
			if (i % 2 == 0)	{
				evenCount++;
				sum += i;
			}
			i++;		
		}
		System.out.println("Sum of first 10 even numbers is : "+sum);
	}
}
